<template>
  <div class="c-container">
    <div>C组件</div>
    <div>饮料：{{ drink }}</div>
    <div>b组件的马子：{{ bgirlFriend }}</div>
  </div>
</template>
<script setup>
import emitter from './eventBus.js'
import { ref } from 'vue'
defineProps(['drink'])

const bgirlFriend = ref('')

// C组件监听方：
emitter.on('getGirlFriend', (data) => {
  console.log('C组件收到消息了', data)
  bgirlFriend.value = data
})
</script>

<style>
.c-container {
  border: 5px solid #3e274c;
  padding: 3px;
  width: 300px;
  height: 300px;
  margin: 10px auto;
}
</style>